function sendRequest() {
  // Content-Type: application/x-www-form-urlencoded
  fetch('http://127.0.0.1/api/post/x-www-form-urlencoded', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    body: 'name=张智琦&age=18'
  })
    .then(res => res.text())
    .then(data => {
      console.log(data)
    })
    .catch(err => {
      console.log(err)
    })
}
